package ArrayUtil;

public class ArrayUtil {
    public static void sort(Object[] array,ICompare ic){
        for (int i=0;i<array.length-1;i++){
            for (int j=0;j<array.length-1-i;j++){
                if (ic.compare(array[j],array[j+1])>0){
                    Object obj = array[j];
                    array[j] = array[j+1];
                    array[j+1] = obj;
                }
            }
        }
    }
}
